package xyz.cerberu.cet.search.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xyz.cerberu.cet.anime.domain.Anime;
import xyz.cerberu.cet.resource.domian.Resource;

import java.util.List;

@Mapper
public interface SearchDao {

    /**
     * @author β世界 on 8:34 2020/11/3
     * 对动漫进行模糊查询
     * @param search: 查询内容
     * @return java.util.List<com.Cet.anime.domain.Anime>
     **/
    List<Anime> selectFuzzyAnimeByName(@Param("search") String search);

    /**
     * @author β世界 on 8:34 2020/11/3
     * 进行分词查询动漫
     * @param search: 分好的词
     * @return java.util.List<com.Cet.anime.domain.Anime>
     **/
    List<Anime> selectAnimeByAnalyzer(@Param("search") List<String> search);

    /**
     * @author β世界 on 23:35 2020/10/21
     * 对资源进行模糊查询
     * @param search:
     * @return java.util.List<com.Cet.resource.domian.Resource>
     **/
    List<Resource> searchFuzzyResource(@Param("search")String search);

    /**
     * @author β世界 on 23:35 2020/10/21
     * 进行对资源进行分词查询
     * @param search: 分词数组
     * @return java.util.List<com.Cet.resource.domian.Resource>
     **/
    List<Resource> searchResourceBySearchList(@Param("search") List<String> search);

}
